package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.ConsumeRecordDto;
import edu.suda.xsap.entity.ConsumeRecord;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")

public interface ConsumeRecordConvert {
    @Mapping(source="cardCountChange", target = "cardCountChange")
    @Mapping(source="cardDayChange", target = "cardDayChange")
    @Mapping(source="id", target = "id")
    @Mapping(source="logId", target = "logId")
    @Mapping(source="memberBindId", target = "memberBindId")
    @Mapping(source="moneyCost", target = "moneyCost")
    @Mapping(source="note", target = "note")
    @Mapping(source="operateType", target = "operateType")
    @Mapping(source="operator", target = "operator")
    @Mapping(source="scheduleId", target = "scheduleId")
    ConsumeRecordDto toDto(ConsumeRecord consumeRecord);
    List<ConsumeRecordDto> toDtoList(List<ConsumeRecord> consumeRecords);


}
